From lingcronin at yahoo.com Tue Nov 2 12:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue Nov 2 12:25:47 2004 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 14:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue Nov 2 14:40:17 2004 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx@linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 16:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue Nov 2 16:41:50 2004 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 16:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue Nov 2 16:42:43 2004 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 12:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed Nov 3 12:20:21 2004 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx@linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 14:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed Nov 3 14:57:38 2004 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 17:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed Nov 3 17:29:56 2004 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces@linuxgrrls.org > [mailto:rxtx-bounces@linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx@linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 18:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed Nov 3 18:17:22 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 18:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed Nov 3 18:24:48 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed Nov 3 20:03:59 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 20:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed Nov 3 20:11:24 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine@linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed Nov 3 20:14:33 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 20:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed Nov 3 20:25:55 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine@linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed Nov 3 20:31:16 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 23:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed Nov 3 23:08:20 2004 Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 20:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu Nov 4 20:41:55 2004 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine@linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sun Nov 7 03:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sun Nov 7 03:29:59 2004 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment.html From taj at www.linux.org.uk Sun Nov 7 05:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Nov 7 05:38:41 2004 Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 15:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun Nov 7 15:48:19 2004 Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj@www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 12:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue Nov 9 12:14:08 2004 Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 17:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Nov 9 17:18:41 2004 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj@www.linux.org.uk From matt at thebasement.com Wed Nov 10 06:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed Nov 10 06:55:09 2004 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 08:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Nov 10 08:22:17 2004 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj@www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 09:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed Nov 10 08:59:50 2004 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc@exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 15:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed Nov 10 15:20:11 2004 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 15:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed Nov 10 15:23:37 2004 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 18:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed Nov 10 18:44:40 2004 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 19:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed Nov 10 18:59:38 2004 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 19:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Nov 10 19:34:33 2004 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj@www.linux.org.uk From matt at thebasement.com Wed Nov 10 21:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed Nov 10 21:58:42 2004 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Thu Nov 11 06:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu Nov 11 06:12:39 2004 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 12:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu Nov 11 12:10:49 2004 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 13:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu Nov 11 13:21:34 2004 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.linuxgrrls.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment.htm From taj at www.linux.org.uk Thu Nov 11 14:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu Nov 11 14:48:46 2004 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj@www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 21:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue Nov 16 21:42:08 2004 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Wed Nov 17 04:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Wed Nov 17 04:54:49 2004 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen@lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Wed Nov 17 06:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed Nov 17 06:04:51 2004 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen@lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 21:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue Nov 23 21:23:45 2004 Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj@www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 20:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed Nov 24 20:43:26 2004 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 21:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed Nov 24 21:42:13 2004 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 21:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed Nov 24 21:51:36 2004 Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj@www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 08:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri Nov 26 07:54:37 2004 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 16:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Nov 26 16:25:22 2004 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 12:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Fri Jun 3 17:46:49 2005 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 14:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Fri Jun 3 17:46:49 2005 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx@linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 16:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:49 2005 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 16:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 12:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx@linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 14:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 17:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces@linuxgrrls.org > [mailto:rxtx-bounces@linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx@linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 18:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 18:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 20:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine@linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 20:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine@linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 23:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 20:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Fri Jun 3 17:46:50 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine@linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sun Nov 7 03:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment.htm From taj at www.linux.org.uk Sun Nov 7 05:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 15:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj@www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 12:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 17:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj@www.linux.org.uk From matt at thebasement.com Wed Nov 10 06:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 08:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj@www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 09:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc@exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 15:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 15:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 18:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 19:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 19:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj@www.linux.org.uk From matt at thebasement.com Wed Nov 10 21:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Fri Jun 3 17:46:51 2005 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Thu Nov 11 06:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 12:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 13:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0001.htm From taj at www.linux.org.uk Thu Nov 11 14:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj@www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 21:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Wed Nov 17 04:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen@lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Wed Nov 17 06:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen@lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 21:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj@www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 20:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 21:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 21:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj@www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 08:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 16:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 17:46:52 2005 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 12:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Fri Jun 3 18:09:12 2005 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 14:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Fri Jun 3 18:09:12 2005 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx@linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx@linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 16:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:12 2005 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 16:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:12 2005 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 12:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces@linuxgrrls.org [mailto:rxtx-bounces@linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx@linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx@linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 14:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 17:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces@linuxgrrls.org > [mailto:rxtx-bounces@linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx@linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 18:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 18:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx@linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 20:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine@linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 20:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine@linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 20:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 23:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 20:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Fri Jun 3 18:09:13 2005 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine@linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sun Nov 7 03:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0001.htm From taj at www.linux.org.uk Sun Nov 7 05:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj@www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 15:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj@www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 12:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 17:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj@www.linux.org.uk From matt at thebasement.com Wed Nov 10 06:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 08:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj@www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 09:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc@exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 15:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj@www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 15:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 18:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 19:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 19:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj@www.linux.org.uk From matt at thebasement.com Wed Nov 10 21:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Thu Nov 11 06:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:09:14 2005 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 12:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 13:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://pixie.strangenoises.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0002.htm From taj at www.linux.org.uk Thu Nov 11 14:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj@www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 21:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Wed Nov 17 04:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen@lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Wed Nov 17 06:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen@lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 21:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj@www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 20:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 21:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 21:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj@www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 08:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 16:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri Jun 3 18:09:15 2005 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx@linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0395.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0395.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0396.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0396.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0397.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0397.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0398.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0398.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0399.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0399.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0400.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0400.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0401.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0401.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0402.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0402.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0403.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0403.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0404.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0404.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0001.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0001.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0002.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0002.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0003.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0003.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0004.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0004.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0005.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0005.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0006.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0006.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0007.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0007.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0008.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0008.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0009.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0009.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0010.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0010.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0001.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0001.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0002.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0002.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0003.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0003.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0004.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0004.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0005.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0005.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0006.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0006.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0007.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0007.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0008.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0008.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0009.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0009.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0010.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0010.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0001.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0001.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0002.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0002.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0003.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0003.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0004.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0004.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0005.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0005.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0006.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0006.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0007.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0007.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041107/88e9502e/attachment-0008.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0008.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0009.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0001.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0010.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0002.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0011.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0003.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0012.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0004.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0013.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0005.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0014.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0006.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0015.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0007.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0016.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0008.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0017.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0009.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0018.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0010.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0019.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0011.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0020.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0012.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0021.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0013.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0022.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0014.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0023.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0015.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0024.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0016.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0025.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0017.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0026.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0018.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0027.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0019.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0028.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0020.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0029.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0021.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0030.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0022.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com> Howdy, I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. I am not a developer but am reasonably technically competent. All I want to do is use the One Wire Viewer Application from Dallas Semiconductor to read iButtons. I have a cheap USB-Serial device (it uses the Prolific chip and driver, the model number is CP-US-03). When I plug the device in with the connected DS9097 iButton serial reader and run the One Wire viewing app. The following is displayed on the console: ========================================= Native lib Version = RXTX-2.1-7pre7 Java lib Version = RXTX-2.1-7pre7 The serial port shows up on the pull down but if it selected then the application crashes with the message "Bus Error" on the console. When I run it again I get the same results but I get the message: RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 Now I know that this means that the lock file wasn't cleaned up. It contains the PID of the previous run as you would expect. I then delete the lock files and try again except this time I click the first Cancel button I see - which is before I pick a serial device (of course I have no idea what the One Wire app is doing). After I click Cancel the app window goes away and after a pause of several seconds I get the "Bus Error" message on the console and the app terminates. After hours of reading news group and the mail archieve I found nothing that really helped define what causes this error. I'm pretty certain that the rights on the uucp directory are correct. I've gone as far as to chown and chgrp the directory to my user account - I get the same results. After reading that people have varying degrees of success with cheap USB-Serial devices I began entertaining the idea that my device might be at fault. So I unplugged it and tried again. Choosing Cancel at my nearest opportunity - I still got the same old "Bus Error" message (I do have valid ports - Modem, Bluetooth PDA Sync, Bluetooth Modem). I am willing to purchase a Keyspan device but I want some assurance that it might help. I might also mention that I have a non-Java GPS software package and I use the same serial device with my GPS and it seems to work fine. I have tried manual installation of the Library files as well as both pkgs (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar experience). So, any ideas? Do I buy a Keyspan device or is it a soft problem? Thanks in advance, Matt Galloway Tulsa, Oklahoma From taj at www.linux.org.uk Wed Nov 10 01:25:07 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 08:25:07 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100069254.4191b9860c962@mail.gallowayfore.com> References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: On Wed, 10 Nov 2004, Matt Galloway wrote: > > > Howdy, > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > I am not a developer but am reasonably technically competent. All I want to do > is use the One Wire Viewer Application from Dallas Semiconductor to read > iButtons. > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > model number is CP-US-03). > > When I plug the device in with the connected DS9097 iButton serial reader and > run the One Wire viewing app. The following is displayed on the console: > > ========================================= > Native lib Version = RXTX-2.1-7pre7 > Java lib Version = RXTX-2.1-7pre7 > > The serial port shows up on the pull down but if it selected then the > application crashes with the message "Bus Error" on the console. > > When I run it again I get the same results but I get the message: > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > Now I know that this means that the lock file wasn't cleaned up. It contains > the PID of the previous run as you would expect. > > I then delete the lock files and try again except this time I click the first > Cancel button I see - which is before I pick a serial device (of course I have > no idea what the One Wire app is doing). After I click Cancel the app window > goes away and after a pause of several seconds I get the "Bus Error" message on > the console and the app terminates. > > After hours of reading news group and the mail archieve I found nothing that > really helped define what causes this error. I'm pretty certain that the > rights on the uucp directory are correct. I've gone as far as to chown and > chgrp the directory to my user account - I get the same results. > > After reading that people have varying degrees of success with cheap USB-Serial > devices I began entertaining the idea that my device might be at fault. So I > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > still got the same old "Bus Error" message (I do have valid ports - Modem, > Bluetooth PDA Sync, Bluetooth Modem). > > I am willing to purchase a Keyspan device but I want some assurance that it > might help. I might also mention that I have a non-Java GPS software package > and I use the same serial device with my GPS and it seems to work fine. > > I have tried manual installation of the Library files as well as both pkgs > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > experience). > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > Hi Matt This sounds like a software problem and its probably rxtx accessing memory outside of its address space somehow. We have not had this report before on Mac OS X that I can recall. It may well be a problem we have addressed in CVS for newer JVM's on other OS's but that would require building the package which I'm not able to do. If you have a very recent JVM installed, you may try backing out to an older one. Its very doubtful that the problem is the keyspan driver. Perhaps someone with a Mac OS X build system could try building the rxtx-2.1 CVS code to see if it helps. -- Trent Jarvi taj at www.linux.org.uk From colinc at exsoft.com.au Wed Nov 10 02:02:12 2004 From: colinc at exsoft.com.au (Colin Canfield) Date: Wed, 10 Nov 2004 20:02:12 +1100 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <35F3EB3A-32F7-11D9-B361-000A95BDCFDE@exsoft.com.au> I haven't tried the CVS version but quite happily using 7pre7 on OSX. I'm using a usb-serial converter called a coolgear u232-p9 Colin On 10/11/2004, at 7:25 PM, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > >> >> >> Howdy, >> >> I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. >> >> I am not a developer but am reasonably technically competent. All I >> want to do >> is use the One Wire Viewer Application from Dallas Semiconductor to >> read >> iButtons. >> >> I have a cheap USB-Serial device (it uses the Prolific chip and >> driver, the >> model number is CP-US-03). >> >> When I plug the device in with the connected DS9097 iButton serial >> reader and >> run the One Wire viewing app. The following is displayed on the >> console: >> >> ========================================= >> Native lib Version = RXTX-2.1-7pre7 >> Java lib Version = RXTX-2.1-7pre7 >> >> The serial port shows up on the pull down but if it selected then the >> application crashes with the message "Bus Error" on the console. >> >> When I run it again I get the same results but I get the message: >> RXTX Warning: Removing stale lock file. >> /var/spool/uucp/LK.001.008.000 >> >> Now I know that this means that the lock file wasn't cleaned up. It >> contains >> the PID of the previous run as you would expect. >> >> I then delete the lock files and try again except this time I click >> the first >> Cancel button I see - which is before I pick a serial device (of >> course I have >> no idea what the One Wire app is doing). After I click Cancel the >> app window >> goes away and after a pause of several seconds I get the "Bus Error" >> message on >> the console and the app terminates. >> >> After hours of reading news group and the mail archieve I found >> nothing that >> really helped define what causes this error. I'm pretty certain that >> the >> rights on the uucp directory are correct. I've gone as far as to >> chown and >> chgrp the directory to my user account - I get the same results. >> >> After reading that people have varying degrees of success with cheap >> USB-Serial >> devices I began entertaining the idea that my device might be at >> fault. So I >> unplugged it and tried again. Choosing Cancel at my nearest >> opportunity - I >> still got the same old "Bus Error" message (I do have valid ports - >> Modem, >> Bluetooth PDA Sync, Bluetooth Modem). >> >> I am willing to purchase a Keyspan device but I want some assurance >> that it >> might help. I might also mention that I have a non-Java GPS software >> package >> and I use the same serial device with my GPS and it seems to work >> fine. >> >> I have tried manual installation of the Library files as well as both >> pkgs >> (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of >> similar >> experience). >> >> So, any ideas? Do I buy a Keyspan device or is it a soft problem? >> > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing > memory > outside of its address space somehow. We have not had this report > before > on Mac OS X that I can recall. It may well be a problem we have > addressed > in CVS for newer JVM's on other OS's but that would require building > the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > ---------------------------------------------------------------------- Colin Canfield colinc at exsoft.com.au Consultant Explorative Software Pty ltd 0412 197 943 From sean_gilbertson at fin-rec.com Wed Nov 10 08:22:59 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 09:22:59 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100069254.4191b9860c962@mail.gallowayfore.com> Message-ID: <20041110152259.GA6885@demeter> The Java VM and compiler and other tools, come with OS X and are version-controlled by Apple. So getting a new VM may actually be somewhat cumbersome, but if it results in no errors, then that experiment could be very valuable. I'd suggest that perhaps you are getting the error as a result of a bug in your own code. I'd recommend that you write the simplest possible application to test RXTX. I know that the "bus error" message is very frequent on OS X. Also, try and build the libraries yourself. It sounds like the libraries are at least partially working, but if they were built with an out of date version of gcc, or linked against an old libc, they could fail. On Wed, Nov 10, 2004 at 08:25:07AM +0000, Trent Jarvi wrote: > On Wed, 10 Nov 2004, Matt Galloway wrote: > > > > > > > Howdy, > > > > I am struggling with the RXTX-2.1-7pre7 version on Mac OS X. > > > > I am not a developer but am reasonably technically competent. All I want to do > > is use the One Wire Viewer Application from Dallas Semiconductor to read > > iButtons. > > > > I have a cheap USB-Serial device (it uses the Prolific chip and driver, the > > model number is CP-US-03). > > > > When I plug the device in with the connected DS9097 iButton serial reader and > > run the One Wire viewing app. The following is displayed on the console: > > > > ========================================= > > Native lib Version = RXTX-2.1-7pre7 > > Java lib Version = RXTX-2.1-7pre7 > > > > The serial port shows up on the pull down but if it selected then the > > application crashes with the message "Bus Error" on the console. > > > > When I run it again I get the same results but I get the message: > > RXTX Warning: Removing stale lock file. /var/spool/uucp/LK.001.008.000 > > > > Now I know that this means that the lock file wasn't cleaned up. It contains > > the PID of the previous run as you would expect. > > > > I then delete the lock files and try again except this time I click the first > > Cancel button I see - which is before I pick a serial device (of course I have > > no idea what the One Wire app is doing). After I click Cancel the app window > > goes away and after a pause of several seconds I get the "Bus Error" message on > > the console and the app terminates. > > > > After hours of reading news group and the mail archieve I found nothing that > > really helped define what causes this error. I'm pretty certain that the > > rights on the uucp directory are correct. I've gone as far as to chown and > > chgrp the directory to my user account - I get the same results. > > > > After reading that people have varying degrees of success with cheap USB-Serial > > devices I began entertaining the idea that my device might be at fault. So I > > unplugged it and tried again. Choosing Cancel at my nearest opportunity - I > > still got the same old "Bus Error" message (I do have valid ports - Modem, > > Bluetooth PDA Sync, Bluetooth Modem). > > > > I am willing to purchase a Keyspan device but I want some assurance that it > > might help. I might also mention that I have a non-Java GPS software package > > and I use the same serial device with my GPS and it seems to work fine. > > > > I have tried manual installation of the Library files as well as both pkgs > > (RXTX_jag worked but RXTX.pkg failed - I've seen several reports of similar > > experience). > > > > So, any ideas? Do I buy a Keyspan device or is it a soft problem? > > > > Hi Matt > > This sounds like a software problem and its probably rxtx accessing memory > outside of its address space somehow. We have not had this report before > on Mac OS X that I can recall. It may well be a problem we have addressed > in CVS for newer JVM's on other OS's but that would require building the > package which I'm not able to do. > > If you have a very recent JVM installed, you may try backing out to an > older one. Its very doubtful that the problem is the keyspan driver. > > Perhaps someone with a Mac OS X build system could try building the > rxtx-2.1 CVS code to see if it helps. > > -- > Trent Jarvi > taj at www.linux.org.uk > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 10 08:23:35 2004 From: jasmine at linuxgrrls.org (jasmine@linuxgrrls.org) Date: Wed, 10 Nov 2004 15:23:35 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110152259.GA6885@demeter> References: <1100069254.4191b9860c962@mail.gallowayfore.com> <20041110152259.GA6885@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: [ship Mac OS X woes] If someone gives me a tarball, I can build against Tiger tonight. -J. From matt at thebasement.com Wed Nov 10 11:42:39 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 12:42:39 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100112159.4192611fb02a7@mail.gallowayfore.com> Thanks for everyones help. Dmitry emailed me directly and supplied me with newly compiled binaries that worked wonderfully. Thanks Dmitry! For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. 'java -version' reports: java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) I know everyone keeps saying "compile yourself" but I don't have a development environment on my Mac and don't have the time, energy or interest to create one. I think that there are probably a lot of folks who just want to download and install the binaries in order to use some gps or 1-wire Java application. For these people it's is very frustrating. I understand the OPen Source project and I understand that it is a voluntary effort and I sincerely appreciate the project and the help I received getting my problem solved. That said, I respectfully submit to the RXTX community a suggestion to post up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - nothing wierd. And Dmitri's binaries worked fine. The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec 9, 2002!!!! I think the problem was proably in the librxtxSerial.jnilib file and it was probably some library version mismatch thing, maybe libc or something, who know. Quite frankly, as an end user I don't care. I am a new Mac OS X user and I am very enthusiastic about my iBook and Java. There is so little software out there for Native Mac GPS and 1-wire and the like. I just hate the thought of end-users getting turned off because RXTX won't work. When if fact, it not only works but works exceptionally well - if you are willing to become a software developer or ask for help in a news group. My recommendation - put a newly compiled latest stable version of the 2.1 stuff (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the script for the lock directory and post it on the download page as a Mac OS X binary download. I would be happy to test on my laptop for anyone that wants it. Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate all of the effort. Thanks again, Matt Galloway From sean_gilbertson at fin-rec.com Wed Nov 10 12:02:30 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 10 Nov 2004 13:02:30 -0600 Subject: [Rxtx] Mac OS X Questions In-Reply-To: <1100112159.4192611fb02a7@mail.gallowayfore.com> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> Message-ID: <20041110190230.GA8857@demeter> I'm glad you got it working! RXTX is a library for developers. It sounds like you have an application that requires it; I was assuming you were talking about an application you're working on. For future reference, all you need to do to get a development environment set up is to install the Apple developer tools. It's very easy. From that point you can use gcc and g++ to compile c and c++ code, and javac to compile java code. You can also use ldd (on the command-line) to find out what files a program (including libraries) was linked against. It would be nice I suppose to have up to date binaries, but from what I can gather, this is a low-traffic project that has good stability and a high average knowledge level in the people who download its files. Perhaps a warning attached to the OS X binaries would be more appropriate, and new binaries could be posted as these issues come up. Again, I'd recommend against altering the build (or execution/VM) environment that Apple distributes. On Wed, Nov 10, 2004 at 12:42:39PM -0600, Matt Galloway wrote: > > > > Thanks for everyones help. Dmitry emailed me directly and supplied me with > newly compiled binaries that worked wonderfully. Thanks Dmitry! > > For the record, I'm using OS X 10.3.5 with the (updated) Apple supplied JVM. > > 'java -version' reports: > > java version "1.4.2_05" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.3) > Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) > > I know everyone keeps saying "compile yourself" but I don't have a development > environment on my Mac and don't have the time, energy or interest to create > one. I think that there are probably a lot of folks who just want to download > and install the binaries in order to use some gps or 1-wire Java application. > For these people it's is very frustrating. I understand the OPen Source > project and I understand that it is a voluntary effort and I sincerely > appreciate the project and the help I received getting my problem solved. That > said, I respectfully submit to the RXTX community a suggestion to post > up-to-date binaries for Mac OS X. I am using recent off the shelf stuff - > nothing wierd. And Dmitri's binaries worked fine. > > The binaries in the 2.1 distribution (the ones that didn't work) are dates Dec > 9, 2002!!!! > > I think the problem was proably in the librxtxSerial.jnilib file and it was > probably some library version mismatch thing, maybe libc or something, who > know. Quite frankly, as an end user I don't care. I am a new Mac OS X user > and I am very enthusiastic about my iBook and Java. There is so little > software out there for Native Mac GPS and 1-wire and the like. I just hate the > thought of end-users getting turned off because RXTX won't work. When if fact, > it not only works but works exceptionally well - if you are willing to become a > software developer or ask for help in a news group. > > My recommendation - put a newly compiled latest stable version of the 2.1 stuff > (RXTXcomm.jar & librxtxSerial.jnilib) in a Vise file of pkg file with the > script for the lock directory and post it on the download page as a Mac OS X > binary download. I would be happy to test on my laptop for anyone that wants > it. > > Sorry to sound whiny. RXTX is working for me now and I do sincerely appreciate > all of the effort. > > Thanks again, > > Matt Galloway > > > > > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From taj at www.linux.org.uk Wed Nov 10 12:37:28 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 10 Nov 2004 19:37:28 +0000 (GMT) Subject: [Rxtx] Mac OS X Questions In-Reply-To: <20041110190230.GA8857@demeter> References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: On Wed, 10 Nov 2004, Sean Gilbertson wrote: > > I'm glad you got it working! > > RXTX is a library for developers. It sounds like you have an > application that requires it; I was assuming you were talking about an > application you're working on. The i-wire is a Dalsemi product. There is a automated installer on their site for w32/Linux but perhaps its time to add Mac OS X as it sounds like rxtx/Mac OS X work so far. Nice to hear. I am curious as to what Dmitry compiled. Was it from CVS or just a recompile of 2.1.7pre17? We will be putting new binaries up for 2.0 and 2.1 real soon. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Wed Nov 10 14:56:45 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 15:56:45 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100123805.41928e9da6651@mail.gallowayfore.com> Dmitry sent me compiled binaries for version RXTX-2.1.7pre20. Thanks for all of the help. -Matt From dmarkman at mac.com Wed Nov 10 23:15:34 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Thu, 11 Nov 2004 01:15:34 -0500 Subject: [Rxtx] Mac OS X Questions In-Reply-To: References: <1100112159.4192611fb02a7@mail.gallowayfore.com> <20041110190230.GA8857@demeter> Message-ID: <191ED9A2-33A9-11D9-AAC2-000A95DA5E9C@mac.com> I just updated sources from CVS and built them so it was pre20 version On Nov 10, 2004, at 2:37 PM, Trent Jarvi wrote: > I am curious as to what Dmitry compiled. Was it from CVS or just a > recompile of 2.1.7pre17? > Dmitry Markman From jpkorva at iki.fi Thu Nov 11 05:13:52 2004 From: jpkorva at iki.fi (Jari Korva) Date: Thu, 11 Nov 2004 14:13:52 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Trent Jarvi wrote: > There was an issue solved in 2.1 CVS that may be causing the observed > problem. RXTX was including the kernel termios rather than the glibc > termios. The later is larger and would overrun the former while > configuring the port. I had not seen this cause problems but others did. > > You can do a simple test with pre17 by cutting the following out of > SerialImp.c: > > #ifdef HAVE_ASM_TERMBITS_H > # include > #else > > There is also a fix for threading issues which should help *bsd and Kaffe. > This would obviously be after the port is configured. But we have no > testing results for Kaffe at this point. Thanks, this helped! Kaffe and rxtx seem to work for me without any problems now. - Jari PS. Using an older armv5b gcc version, the compile failed because of undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this was easy to fix based on an example I found from SerialImp.h. From mylist at chrishome.com Thu Nov 11 06:23:07 2004 From: mylist at chrishome.com (Christopher Cheng) Date: Thu, 11 Nov 2004 21:23:07 +0800 Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? Message-ID: I've put the .so files in the following directories /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with the line Driver=gnu.io.RXTXCommDriver As I execute a java class in command, it works fine; but the servlet in tomcat returns javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open shared object file: No such file or directory -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041111/916fd74d/attachment-0031.html From taj at www.linux.org.uk Thu Nov 11 07:51:53 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 11 Nov 2004 14:51:53 +0000 (GMT) Subject: [Rxtx] Where should I put the .so files in Linux for Tomcat? In-Reply-To: References: Message-ID: On Thu, 11 Nov 2004, Christopher Cheng wrote: > I've put the .so files in the following directories > /usr/java/j2sdk1.4.2_06/jre/lib/ext/comm.jar > /usr/java/j2sdk1.4.2_06/jre/lib/ext/jcl.jar > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/libSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRS485.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxI2C.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxParallel.so > /usr/java/j2sdk1.4.2_06/jre/lib/i386/librxtxRaw.so > > then, I create "/usr/java/j2sdk1.4.2_06/jre/lib/javax.comm.properties" with > the line > Driver=gnu.io.RXTXCommDriver > > As I execute a java class in command, it works fine; but the servlet in > tomcat returns > javax.servlet.ServletException: librxtxSerial: librxtxSerial.so: cannot open > shared object file: No such file or directory > I suspect this is a servlet security issue not the location of the files which appears to be correct. -- Trent Jarvi taj at www.linux.org.uk From george.palmer at gmail.com Tue Nov 16 14:12:58 2004 From: george.palmer at gmail.com (George Palmer) Date: Tue, 16 Nov 2004 21:12:58 +0000 Subject: [Rxtx] RXTX and Keyspan USA19-HS Message-ID: Has anybody any experience with the above usb->serial hardware device? My CommPortIdentifier is finding tty.USA19H191P1.1 and cu.USA19H191P1.1 under MAC whereas I think the port required doesn't have the .1 on the end. Unfortunately I don't have access to a MAC or this device, somebody is just trying to use the device with my software. The error message is the port is in use. Could this even be a permissions issue? Thanks in advance for any pointers! George From Bob_Jacobsen at lbl.gov Tue Nov 16 21:58:29 2004 From: Bob_Jacobsen at lbl.gov (Bob Jacobsen) Date: Tue, 16 Nov 2004 20:58:29 -0800 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: At 9:12 PM +0000 11/16/04, George Palmer wrote: >Has anybody any experience with the above usb->serial hardware device? > My CommPortIdentifier is finding tty.USA19H191P1.1 and >cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >have the .1 on the end. > >Unfortunately I don't have access to a MAC or this device, somebody is >just trying to use the device with my software. The error message is >the port is in use. Could this even be a permissions issue? I've successfully used RXTX with this device under several versions of MacOS X, most recently 10.3.6 It certainly could be a permissions issue. You should have the user look for lock files. They could be in /var/spool/lock/ or /var/spool/uucp/ depending on the RXTX version being used. Bob -- -------------- Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM JacobsenRG From dmarkman at mac.com Tue Nov 16 23:09:14 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Wed, 17 Nov 2004 01:09:14 -0500 Subject: [Rxtx] RXTX and Keyspan USA19-HS In-Reply-To: References: Message-ID: <34F2B900-385F-11D9-BE1F-000A95DA5E9C@mac.com> it's probably won't help but still it could help if you restart your computer after installing RXTX also check palm software sometimes it uses usb port On Nov 16, 2004, at 11:58 PM, Bob Jacobsen wrote: > At 9:12 PM +0000 11/16/04, George Palmer wrote: >> Has anybody any experience with the above usb->serial hardware device? >> My CommPortIdentifier is finding tty.USA19H191P1.1 and >> cu.USA19H191P1.1 under MAC whereas I think the port required doesn't >> have the .1 on the end. >> >> Unfortunately I don't have access to a MAC or this device, somebody is >> just trying to use the device with my software. The error message is >> the port is in use. Could this even be a permissions issue? > > I've successfully used RXTX with this device under several versions of > MacOS X, most recently 10.3.6 > > It certainly could be a permissions issue. You should have the user > look for lock files. They could be in /var/spool/lock/ or > /var/spool/uucp/ depending on the RXTX version being used. > > Bob > -- > -------------- > Bob_Jacobsen at lbl.gov, +1-510-486-7355, fax +1-510-643-8497, AIM > JacobsenRG > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From p_edson at yahoo.com Tue Nov 23 14:29:55 2004 From: p_edson at yahoo.com (Patrick Edson) Date: Tue, 23 Nov 2004 13:29:55 -0800 (PST) Subject: [Rxtx] Serial port output empty In-Reply-To: <20040917110002.1841E732F7@mail.linuxgrrls.org> Message-ID: <20041123212955.66255.qmail@web12704.mail.yahoo.com> > > Message: 2 > Date: Thu, 16 Sep 2004 17:48:23 +0100 (BST) > From: Trent Jarvi > Subject: Re: [Rxtx] > SerialPortEvent.OUTPUT_BUFFER_EMPTY > To: Java RXTX discussion > Message-ID: > > > Content-Type: TEXT/PLAIN; charset=US-ASCII > > On Thu, 16 Sep 2004, Patrick Edson wrote: > > > Hi, > > > > With both pre16 and pre17 I am seeing different > > behavior for SerialPortEvent.OUTPUT_BUFFER_EMPTY > > events between win and linux under jvm 1.4.x. > > > > On windows, I get one such event when I finish an > > asynchronous write. On linux, I am getting > pounded > > with them as soon as I open the port, even before > I > > send any data, and they just keep going before > during > > and after sending data. I have tried to isolate > the > > difference, but haven't had any luck. > > > > With pre16 using JVM 1.3 this doesn't seem to be > the > > case - linux behaves the same as windows. > > > > Has anyone encountered this, or have any ideas? > > > > Thanks. > > > > > > > > In SerialImp.c, look for code like: > > send_event( eis, SPE_DATA_AVAILABLE, 1 ) > > And modify it to: > > if(!send_event( eis, SPE_DATA_AVAILABLE, 1 )) > { > eis->eventflags[SPE_DATA_AVAILABLE] = 0; > } > > There are two. Only one is used depending upon the > port. Some ports are > less complete than others so there is two code paths > for data available. > > I suspect someone was reporting problems with not > recieving enough data > available events. The lower API on linux is going > to be constantly noting > that there is data available until it is read. You > can shut down the > data available event sending as above as above. The > flags should trigger > back after a successfull read. While data is > available, select will not > block. It may be possible to do something more sane > with poll(). The > result is sleep() is used to slow down the > eventLoop. You dont want to > leave data on the port. If you notice CPU use, look > for the > data_available logic and increase the sleeps or look > at a poll() > implementation. > > > -- > Trent Jarvi > taj at www.linux.org.uk > The problem I'm seeing isn't repeated notifications of data available. I'm being repeatedly told that there is nothing in the output buffer. This starts just by opening the port. I tried the change above and it had no effect on this. Basically, if I write something asynchronously on other platforms, I'm notified once when the write is finished, which seems expected. On Linux I am constantly told when the output buffer is empty, whether I've written something or not. This is the SerialPortEvent.OUTPUT_BUFFER_EMPTY. Is there a workaround for this? Thanks, Patrick __________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com From robilad at yahoo.com Wed Nov 24 13:49:49 2004 From: robilad at yahoo.com (Dalibor Topic) Date: Wed, 24 Nov 2004 12:49:49 -0800 (PST) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: Message-ID: <20041124204949.48199.qmail@web51004.mail.yahoo.com> --- Jari Korva wrote: > On Tue, 9 Nov 2004, Trent Jarvi wrote: > > There was an issue solved in 2.1 CVS that may be causing the observed > > problem. RXTX was including the kernel termios rather than the glibc > > termios. The later is larger and would overrun the former while > > configuring the port. I had not seen this cause problems but others did. > > > > You can do a simple test with pre17 by cutting the following out of > > SerialImp.c: > > > > #ifdef HAVE_ASM_TERMBITS_H > > # include > > #else > > > > There is also a fix for threading issues which should help *bsd and Kaffe. > > This would obviously be after the port is configured. But we have no > > testing results for Kaffe at this point. > > Thanks, this helped! Kaffe and rxtx seem to work for me without any > problems now. > > - Jari > > PS. Using an older armv5b gcc version, the compile failed because of > undefined SSIZE_MAX in RS485Imp.c, I2CImp.c and RawImp.c. Luckily, this > was easy to fix based on an example I found from SerialImp.h. Wow, that's fantastic! A lot of people have been asking for that. Could you please, please write a FAQ.rxtx for Kaffe's documentation on how to go about it? I'd love to merge rxtx into kaffe eventually, as it would be a wonderful tool to have on embedded systems. cheers, dalibor topic __________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo From david.pache at usherbrooke.ca Wed Nov 24 14:48:35 2004 From: david.pache at usherbrooke.ca (David PACHE) Date: Wed, 24 Nov 2004 16:48:35 -0500 Subject: [Rxtx] RXTX installation Message-ID: <200411241648.35075.david.pache@usherbrooke.ca> Hi everybody, My distribution is Debian sarge. First, I tried to install the librxtx-java Debian package. No error. After, I installed the java-commapi of sun. But when i try Blackbox: java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver gnu.io.RXTXCommDriver All librxtx* seems to be in /usr/lib. I m very disappointed because i have ever seen worked, and i don't why that is not work now. Anybody have an idea? -- David PACHE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ?tudiant au doctorat en informatique Laboratoire DOMUS Universit? de Sherbrooke (819) 821-8000 poste: 3825 PhD student in computer science DOMUS laboratory university of Sherbrooke (819) 821-8000 service: 3825 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From taj at www.linux.org.uk Wed Nov 24 14:58:00 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 24 Nov 2004 21:58:00 +0000 (GMT) Subject: [Rxtx] RXTX installation In-Reply-To: <200411241648.35075.david.pache@usherbrooke.ca> References: <200411241648.35075.david.pache@usherbrooke.ca> Message-ID: On Wed, 24 Nov 2004, David PACHE wrote: > Hi everybody, > > My distribution is Debian sarge. > First, I tried to install the librxtx-java Debian package. No error. After, I > installed the java-commapi of sun. But when i try Blackbox: > > java -noverify -classpath BlackBox.jar:/usr/share/java/RXTXcomm.jar > -Djava.library.path=/usr/lib/:/usr/local/jdk1.5.0/jre/lib/ext/ BlackBox > > Caught java.lang.UnsatisfiedLinkError: getDeviceDirectory while loading driver > gnu.io.RXTXCommDriver > > All librxtx* seems to be in /usr/lib. > I m very disappointed because i have ever seen worked, and i don't why that is > not work now. > > Anybody have an idea? > > Java has its own LD_LIBRARY_PATH set by the java script/application. It will look for the native libraries in [java,jdk,jre]/lib/ext/$CPU if you use Sun's jdk/jre. I see libjava.so and other native libraries from the jre are in the same directory. -- Trent Jarvi taj at www.linux.org.uk From g.telkamp at domologic.de Fri Nov 26 01:01:23 2004 From: g.telkamp at domologic.de (Gerrit Telkamp) Date: Fri, 26 Nov 2004 09:01:23 +0100 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <7252799689.20041125212111@domologic.de> References: <7252799689.20041125212111@domologic.de> Message-ID: <1834945995.20041126090123@domologic.de> Dear list, I had a problem using RXTX on a MAC running under OSX. Perheaps someone has an idea. RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter (Profilic). The required USB driver for MAC OSX was installed successfully. The selected communication port was not owned by an other application, but the driver returned "Unknown Application" when I tried to open or close the serial port via Java. Does anyone has an idea what this message means? Just a warning? --------------- I used the RXTX from ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz containing the binaries for the MAC driver in MACOSX_IDE/Cw/... Regarding the RXTXcomm.jar and the library *.jnilib, there are two different versions in the archive: While the RXTXcomm.jar uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in a warning, but meaybe this is really just a warning... Binaries in CVS are checked-in as text files -------------------------------------------- Alternatively, I tried the latest binary release I found in the CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both cases (for the jar and for the jnilib). But unfortunately, the jnilib is not running on a MAC: The message binary seems to be invalid (message was like "0 expected at..."). It seems that the binaries are checked-in as text files (CVS Flags: -kkv). Where can I get the latest binary release without compiling them? Thank you and best regards, Gerrit. From dmarkman at mac.com Fri Nov 26 09:31:18 2004 From: dmarkman at mac.com (Dmitry Markman) Date: Fri, 26 Nov 2004 11:31:18 -0500 Subject: [Rxtx] RXTX for MacOSX In-Reply-To: <1834945995.20041126090123@domologic.de> References: <7252799689.20041125212111@domologic.de> <1834945995.20041126090123@domologic.de> Message-ID: <99616400-3FC8-11D9-860A-000A95DA5E9C@mac.com> why you didn't use installer? MACOSX_IDE/ForPackageMaker/RXTX_Jag.pkg.sit.hqx (uncode and unstuff) also files from CW and PB directory just for developers to build binaries if you have developers tools installed just tuse xcode project from pb directory to build binaries are you member of uucp group? On Nov 26, 2004, at 3:01 AM, Gerrit Telkamp wrote: > Dear list, > > I had a problem using RXTX on a MAC running under OSX. Perheaps > someone has an idea. > > RXTX had to use a serial port from a PL-2303 USB-to-Serial-Adapter > (Profilic). The required USB driver for MAC OSX was installed > successfully. The selected communication port was not owned by an > other application, but the driver returned "Unknown Application" when > I tried to open or close the serial port via Java. Does anyone has an > idea what this message means? > > Just a warning? > --------------- > I used the RXTX from > ftp://jarvi.dsl.frii.com/pub/rxtx/rxtx-2.1-7pre17.tar.gz > containing the binaries for the MAC driver in > MACOSX_IDE/Cw/... > Regarding the RXTXcomm.jar and the library *.jnilib, there are > two different versions in the archive: While the RXTXcomm.jar > uses 2.1-7pre12, the *.jnilib uses 2.1-7pre14. This results in > a warning, but meaybe this is really just a warning... > > Binaries in CVS are checked-in as text files > -------------------------------------------- > Alternatively, I tried the latest binary release I found in the > CVS: MACOSX_IDE/Cw/... This seems to be a 2.1-7pre17 in both > cases (for the jar and for the jnilib). But unfortunately, the > jnilib is not running on a MAC: The message binary seems to be > invalid (message was like "0 expected at..."). It seems that the > binaries are checked-in as text files (CVS Flags: -kkv). > > Where can I get the latest binary release without compiling them? > > Thank you and best regards, > > Gerrit. > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > Dmitry Markman From lingcronin at yahoo.com Tue Nov 2 05:26:36 2004 From: lingcronin at yahoo.com (Aisling Cronin) Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: <20041102122636.78104.qmail@web12008.mail.yahoo.com> Hi I'm getting the same error except in english WriteFile outputStream write error- java/io/IOException: The security account database contains an inconsistency in writeByte- I was using MichalHobot's rxtx on ipaq 5455 with jeode to communicate via BT It opens up the bluetooth wince controller app which i guess would be the first stage to opening the port but it doesn't get any further Did you find out what the cause of this error was? __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail From doktorbernd at hotmail.com Tue Nov 2 07:40:27 2004 From: doktorbernd at hotmail.com (Doktor Bernd) Date: Tue, 02 Nov 2004 14:40:27 +0000 Subject: [Rxtx] rxtx on iPAQ, strange Exception Message-ID: Hi, well, I think I solved that problem but it was a lot of try and error, so I am not sure what I did exactly. This is what I wrote on the list after I solved the problem, but reading it now I think it won't be much help. I think it just says "I have no idea". "I think I got the Exception because I was using port 3 which is the IRComm port on iPAQ. My registry was pointing to COM2: but I couldn't open that port and on the net I found a guy who was claiming that COM2 is the raw IR port on iPAQ. So I flashed my ROM again and suddenly I had a COM2:" Hope you have the same luck as me, FReAK >From: Aisling Cronin >Reply-To: Java RXTX discussion >To: Rxtx at linuxgrrls.org >Subject: [Rxtx] rxtx on iPAQ, strange Exception >Date: Tue, 2 Nov 2004 04:26:36 -0800 (PST) > >Hi I'm getting the same error except in english > >WriteFile outputStream write error- >java/io/IOException: The security account database >contains an inconsistency in writeByte- > >I was using MichalHobot's rxtx on ipaq 5455 with jeode >to communicate via BT > >It opens up the bluetooth wince controller app which i >guess would be the first stage to opening the port but >it doesn't get any further > >Did you find out what the cause of this error was? > > > >__________________________________ >Do you Yahoo!? >Yahoo! Mail Address AutoComplete - You start. We finish. >http://promotions.yahoo.com/new_mail >_______________________________________________ >Rxtx mailing list >Rxtx at linuxgrrls.org >http://mailman.linuxgrrls.org/mailman/listinfo/rxtx _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/ From sean_gilbertson at fin-rec.com Tue Nov 2 09:42:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:42:44 -0600 Subject: [Rxtx] Garbage/invalid data? Message-ID: <20041102164244.GA378@demeter> Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From sean_gilbertson at fin-rec.com Tue Nov 2 09:43:37 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Tue, 2 Nov 2004 10:43:37 -0600 Subject: [Rxtx] re: Garbage data Message-ID: <20041102164337.GA459@demeter> I'm using RXTX 2.0-5 -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From lonedesign_2k at yahoo.com Wed Nov 3 05:21:24 2004 From: lonedesign_2k at yahoo.com (Dodger) Date: Wed, 3 Nov 2004 14:21:24 +0200 Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: Found the problem... I wasn't sending a hang-up command so the modem was remaining in an off-hook state. This explains why it was working on first execution only. It also seems that you need to pause for a while in between opening the port and sending the first command. (1 second is enough, possibly less.) Pretty silly, but you live and learn! Glen. -----Original Message----- From: rxtx-bounces at linuxgrrls.org [mailto:rxtx-bounces at linuxgrrls.org]On Behalf Of Dodger Sent: 31 October 2004 17:29 To: rxtx at linuxgrrls.org Subject: [Rxtx] Modem/Serial Comm. Problem Hi, I've spent two full days trying to find an answer to this question, without any luck. When I send an AT command to my modem it just echo's it right back at me, instead of sending some form of acknowledgement, such as an OK response code. Of course, this means it doesn't respond correctly to dialling commands either (AT Dnnnnnnn). The problem is this: BlackBox works, as well as another sample application I have -- just not code (typical). Any ideas as to why this is happening? Could it be that my sending and receiving is not done in separate threads? Some info: OS: Windows 2000 JDK: 1.5.0 Modem: 3Com U.S. Robotics 56K Faxmodem My code follows: (Test & _SerialPort) ==[ Test ] public class Test { public static void main(String[] arguments) { _SerialPort port = new _SerialPort(); port.open(); port.write("AT D7152016;\r"); try { Thread.sleep(10000); } catch(InterruptedException e) { System.err.println(e); } port.close(); } } == ==[_SerialPort] import gnu.io.*; import java.io.*; import java.util.TooManyListenersException; public class _SerialPort implements SerialPortEventListener, CommPortOwnershipListener { private CommPortIdentifier portID; private SerialPort serialPort; private InputStream in; private OutputStream out; private byte[] buffer = new byte[2048]; public _SerialPort() { // TODO: Pass parameter object to constructor } public void open() { try { portID = CommPortIdentifier.getPortIdentifier("COM1"); } catch(NoSuchPortException e) { System.err.println(e); } try { serialPort = (SerialPort)portID.open("_SerialPort", 5000); } catch(PortInUseException e) { System.err.println(e); } try { in = serialPort.getInputStream(); out = serialPort.getOutputStream(); } catch(IOException e) { System.err.println(e); } try { serialPort.addEventListener(this); } catch(TooManyListenersException e) { System.err.println(e); } serialPort.notifyOnBreakInterrupt(true); serialPort.notifyOnCarrierDetect(true); serialPort.notifyOnCTS(true); serialPort.notifyOnDataAvailable(true); serialPort.notifyOnDSR(true); serialPort.notifyOnFramingError(true); serialPort.notifyOnOutputEmpty(true); serialPort.notifyOnOverrunError(true); serialPort.notifyOnParityError(true); serialPort.notifyOnRingIndicator(true); portID.addPortOwnershipListener(this); } public void write(String data) { try { out.write(data.getBytes()); } catch(IOException e) { System.err.println(e); } } public void close() { try { // Close the i/o streams in.close(); out.close(); } catch(IOException e) { System.err.println(e); } // Close the port. serialPort.close(); // Remove the ownership listener portID.removePortOwnershipListener(this); } public void serialEvent(SerialPortEvent evt) { switch(evt.getEventType()) { // Break interrupt case SerialPortEvent.BI: System.out.println("Break interrupt"); break; // Carrier detect case SerialPortEvent.CD: System.out.println("Carrier detect"); break; // Clear to send case SerialPortEvent.CTS: System.out.println("Clear to send"); break; // Data available at the serial port case SerialPortEvent.DATA_AVAILABLE: int count; try { while(in.available() > 0) { count = in.read(buffer); if(count > 0) { if(count > buffer.length) { System.err.println("Input buffer overflow"); } System.out.println(new String(buffer, 0, count)); } } } catch(IOException e) { System.err.println(e); } break; // Data set ready case SerialPortEvent.DSR: System.out.println("Data set ready"); break; // Framing error case SerialPortEvent.FE: System.out.println("Framing error"); break; // Overrun error case SerialPortEvent.OE: System.out.println("Overrun error"); break; // Output buffer is empty case SerialPortEvent.OUTPUT_BUFFER_EMPTY: System.out.println("Output buffer is empty"); break; // Parity error case SerialPortEvent.PE: System.out.println("Parity error"); break; // Ring indicator case SerialPortEvent.RI: System.out.println("Ring indicator"); break; } } public void ownershipChange(int type) { switch(type) { case CommPortOwnershipListener.PORT_OWNED: System.out.println("PORT_OWNED"); break; case CommPortOwnershipListener.PORT_OWNERSHIP_REQUESTED: System.out.println("PORT_OWNERSHIP_REQUESTED"); break; case CommPortOwnershipListener.PORT_UNOWNED: System.out.println("PORT_UNOWNED"); break; } } } == If you have any other working sample code for serial/modem i/o, please send it my way. Thanks, Glen. _______________________________________________ Rxtx mailing list Rxtx at linuxgrrls.org http://mailman.linuxgrrls.org/mailman/listinfo/rxtx From sean_gilbertson at fin-rec.com Wed Nov 3 07:58:44 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 08:58:44 -0600 Subject: [Rxtx] re: Garbage data In-Reply-To: <20041102164337.GA459@demeter> References: <20041102164337.GA459@demeter> Message-ID: <20041103145844.GA14516@demeter> Looking further into this issue, I discovered that the bar code format we were using was unreliable and may have resulted in invalid values being read. If anyone does know of any issues resulting in receiving bogus data, though, please still let me know. On Tue, Nov 02, 2004 at 10:43:37AM -0600, Sean Gilbertson wrote: > > I'm using RXTX 2.0-5 > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From rwang at redrocksemi.com Wed Nov 3 10:31:00 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 09:31:00 -0800 (PST) Subject: [Rxtx] Modem/Serial Comm. Problem In-Reply-To: Message-ID: <20041103173100.95012.qmail@web209.biz.mail.re2.yahoo.com> Thanks a lot, Glen. I will try it. Raine --- Dodger wrote: > Found the problem... > > I wasn't sending a hang-up command so the modem was > remaining in an off-hook > state. This explains why it was working on first > execution only. > > It also seems that you need to pause for a while in > between opening the port > and sending the first command. (1 second is enough, > possibly less.) > > Pretty silly, but you live and learn! > > Glen. > > -----Original Message----- > From: rxtx-bounces at linuxgrrls.org > [mailto:rxtx-bounces at linuxgrrls.org]On > Behalf Of Dodger > Sent: 31 October 2004 17:29 > To: rxtx at linuxgrrls.org > Subject: [Rxtx] Modem/Serial Comm. Problem > > > Hi, > > I've spent two full days trying to find an answer to > this question, without > any luck. > > When I send an AT command to my modem it just echo's > it right back at me, > instead of sending some form of acknowledgement, > such as an OK response > code. > > Of course, this means it doesn't respond correctly > to dialling commands > either (AT Dnnnnnnn). > > The problem is this: BlackBox works, as well as > another sample application I > have -- just not code (typical). > > Any ideas as to why this is happening? Could it be > that my sending and > receiving is not done in separate threads? > > Some info: > OS: Windows 2000 > JDK: 1.5.0 > Modem: 3Com U.S. Robotics 56K Faxmodem > > My code follows: (Test & _SerialPort) > > ==[ Test ] > public class Test > { > public static void main(String[] arguments) > { > _SerialPort port = new _SerialPort(); > > port.open(); > port.write("AT D7152016;\r"); > > try { > Thread.sleep(10000); > } catch(InterruptedException e) { > System.err.println(e); > } > > port.close(); > } > } > == > > ==[_SerialPort] > import gnu.io.*; > import java.io.*; > import java.util.TooManyListenersException; > > public class _SerialPort > implements SerialPortEventListener, > CommPortOwnershipListener > { > private CommPortIdentifier portID; > private SerialPort serialPort; > private InputStream in; > private OutputStream out; > > private byte[] buffer = new byte[2048]; > > public _SerialPort() > { > // TODO: Pass parameter object to constructor > } > > public void open() > { > try { > portID = > CommPortIdentifier.getPortIdentifier("COM1"); > } catch(NoSuchPortException e) { > System.err.println(e); > } > > try { > serialPort = > (SerialPort)portID.open("_SerialPort", 5000); > } catch(PortInUseException e) { > System.err.println(e); > } > > try { > in = serialPort.getInputStream(); > out = serialPort.getOutputStream(); > } catch(IOException e) { > System.err.println(e); > } > > try { > serialPort.addEventListener(this); > } catch(TooManyListenersException e) { > System.err.println(e); > } > > serialPort.notifyOnBreakInterrupt(true); > serialPort.notifyOnCarrierDetect(true); > serialPort.notifyOnCTS(true); > serialPort.notifyOnDataAvailable(true); > serialPort.notifyOnDSR(true); > serialPort.notifyOnFramingError(true); > serialPort.notifyOnOutputEmpty(true); > serialPort.notifyOnOverrunError(true); > serialPort.notifyOnParityError(true); > serialPort.notifyOnRingIndicator(true); > > portID.addPortOwnershipListener(this); > } > > public void write(String data) > { > try { > out.write(data.getBytes()); > } catch(IOException e) { > System.err.println(e); > } > } > > public void close() > { > try { > // Close the i/o streams > in.close(); > out.close(); > } catch(IOException e) { > System.err.println(e); > } > > // Close the port. > serialPort.close(); > > // Remove the ownership listener > portID.removePortOwnershipListener(this); > } > > public void serialEvent(SerialPortEvent evt) > { > switch(evt.getEventType()) > { > // Break interrupt > case SerialPortEvent.BI: > System.out.println("Break interrupt"); > break; > > // Carrier detect > case SerialPortEvent.CD: > System.out.println("Carrier detect"); > break; > > // Clear to send > case SerialPortEvent.CTS: > System.out.println("Clear to send"); > break; > > // Data available at the serial port > case SerialPortEvent.DATA_AVAILABLE: > > int count; > > try { > while(in.available() > 0) > { > count = in.read(buffer); > > if(count > 0) > { > if(count > buffer.length) > { > System.err.println("Input buffer overflow"); > === message truncated === From neil.benn at gmail.com Wed Nov 3 11:18:26 2004 From: neil.benn at gmail.com (Neil Benn) Date: Wed, 3 Nov 2004 19:18:26 +0100 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041102164244.GA378@demeter> References: <20041102164244.GA378@demeter> Message-ID: Hello, According to what/where you are running, that could be normal serial data loss from your environment. Have you tried running a soak test using a different setup? Cheers, Neil On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson wrote: > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > -- > Sean Gilbertson > IT Systems/Software Developer > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From sean_gilbertson at fin-rec.com Wed Nov 3 11:25:49 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 12:25:49 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> Message-ID: <20041103182549.GA17519@demeter> I've just updated some of my code, so if some of the values are still getting by tomorrow, some testing such as you suggest may be prudent. Are you saying that this can occur in any program that communicates with the serial port, or are you saying that it's usually bugs? What do you mean by "different setup"? On Wed, Nov 03, 2004 at 07:18:26PM +0100, Neil Benn wrote: > Hello, > > According to what/where you are running, that could be > normal serial data loss from your environment. Have you tried running > a soak test using a different setup? > > Cheers, > > Neil > > > On Tue, 2 Nov 2004 10:42:44 -0600, Sean Gilbertson > wrote: > > > > Has anyone had problems with RXTX returning garbage or invalid or incorrect data, without returning or raising an error? I wrote some software to retrieve data from a serial device, and things have been working fine for 11 months, but with a new application (which uses my same data retrieval class), which receives heavier loads under increased frequency, I have received some bogus values. Not too many -- about 3 in 700 -- but any is too many, because now I can't totally trust my data. If anyone knows why RXTX (or anything else) would cause this, with ostensibly no errors, please let me know. Thank you very much. > > > > -- > > Sean Gilbertson > > IT Systems/Software Developer > > > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > > _______________________________________________ > > Rxtx mailing list > > Rxtx at linuxgrrls.org > > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > > > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:03:57 2004 From: jasmine at linuxgrrls.org (jasmine at linuxgrrls.org) Date: Wed, 3 Nov 2004 20:03:57 -0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103182549.GA17519@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> Message-ID: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> > > I've just updated some of my code, so if some of the values are still > getting by tomorrow, some testing such as you suggest may be prudent. > Are you saying that this can occur in any program that communicates with > the serial port, or are you saying that it's usually bugs? What do you > mean by "different setup"? RS232 is not error checked and as a consequence is not 100% reliable. This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on barcodes exist. Kindly use them. -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:12:33 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:12:33 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> Message-ID: <20041103201233.GA19863@demeter> Well obviously there is no RS232 stack (that I know of). As I was stating in my own response to this thread, the bar code format we use for our cards is, as I discovered the other day, insecure in that it only specifies two bookend values to evaluate compliance. As a result, any of the content may be invalid; unlike some of the more popular bar code formats, this format (codabar-c) does not feature reliable error detection. On Wed, Nov 03, 2004 at 08:03:57PM -0000, jasmine at linuxgrrls.org wrote: > > > > I've just updated some of my code, so if some of the values are still > > getting by tomorrow, some testing such as you suggest may be prudent. > > Are you saying that this can occur in any program that communicates with > > the serial port, or are you saying that it's usually bugs? What do you > > mean by "different setup"? > > RS232 is not error checked and as a consequence is not 100% reliable. > This, and reasons like it, are why XMODEM, TCP/IP, and the check digits on > barcodes exist. Kindly use them. > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:14:31 2004 From: jasmine at linuxgrrls.org (jasmine at linuxgrrls.org) Date: Wed, 3 Nov 2004 20:14:31 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103201233.GA19863@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Well obviously there is no RS232 stack (that I know of). As I was > stating in my own response to this thread, the bar code format we > use for our cards is, as I discovered the other day, insecure in > that it only specifies two bookend values to evaluate compliance. > As a result, any of the content may be invalid; unlike some of the > more popular bar code formats, this format (codabar-c) does not > feature reliable error detection. Then for reliability you need to change your software to calculate an ECC and add it to every printed barcode. If your system has time to scan again on invalid data, a simple error checking hash could be enough; otherwise, for example in an automated assembly line, you may need to use a full Reed-Solomon type error recovery algorithm. There is no reliable way to avoid doing this. Sorry :-( -J. From sean_gilbertson at fin-rec.com Wed Nov 3 13:27:05 2004 From: sean_gilbertson at fin-rec.com (Sean Gilbertson) Date: Wed, 3 Nov 2004 14:27:05 -0600 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> Message-ID: <20041103202705.GA20010@demeter> Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: * Reprint all employee cards using a reliable format. * Replace all damaged cards when errors occur, and accept the risk. * Couple card scans with the entry of a pre-existing identifier. The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > Well obviously there is no RS232 stack (that I know of). As I was > > stating in my own response to this thread, the bar code format we > > use for our cards is, as I discovered the other day, insecure in > > that it only specifies two bookend values to evaluate compliance. > > As a result, any of the content may be invalid; unlike some of the > > more popular bar code formats, this format (codabar-c) does not > > feature reliable error detection. > > Then for reliability you need to change your software to calculate an ECC > and add it to every printed barcode. If your system has time to scan > again on invalid data, a simple error checking hash could be enough; > otherwise, for example in an automated assembly line, you may need to use > a full Reed-Solomon type error recovery algorithm. > > There is no reliable way to avoid doing this. Sorry :-( > > -J. -- Sean Gilbertson IT Systems/Software Developer Financial Recovery Services, Inc. 952-831-4800 x1211 This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. From jasmine at linuxgrrls.org Wed Nov 3 13:31:15 2004 From: jasmine at linuxgrrls.org (jasmine at linuxgrrls.org) Date: Wed, 3 Nov 2004 20:31:15 +0000 (GMT) Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: On Wed, 3 Nov 2004, Sean Gilbertson wrote: > Does codabar allow for ECC? I don't know that it does, and even if > it did, to reliably calculate checksums you need to generate > numbers that fit the given algorithm. I don't believe we could do > that for a system that assigns numbers sequentially. Any barcode that can code digits will code ECC; it's just a bunch of digits you add to the 'payload' data at the end of the barcode. It needn't go any further than the printed barcode and doesn't even need to be in the human-readable equivalent that is usually printed below it. Obviously you'd have to add code to generate the checksums to your barcode printing software and you'd need to add code to do the error check and remove the ECC check-digits to your Java application. This doesn't seem all that difficult, if you have access to the code that prints the cards... -J. From rwang at redrocksemi.com Wed Nov 3 16:09:34 2004 From: rwang at redrocksemi.com (Raine Wang) Date: Wed, 3 Nov 2004 15:09:34 -0800 (PST) Subject: [Rxtx] reading data from serial port on redhat Message-ID: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Hi, I wrote a program to read external device's data thought serial port. This program need to run at windows and linux. It runs at windows very well. But when it runs at linux, it meets a weird problem with the same external device. It can't get data from the serial port.It checked the available() and uses enableReceiveTimeout(). I found there is no data available. But if I turn on the external device after the redhat booted up, the program can run and get data. This program doesn't meet this problem at windows. This external device doesn't need the driver, it talks with the pc throught serial port. Now I am wondering if it is the OS problem or the program problem. This is far from my limited knowledge. Welcome any idea. Thanks in advance. From neil.benn at gmail.com Thu Nov 4 13:43:01 2004 From: neil.benn at gmail.com (Neil Benn) Date: Thu, 4 Nov 2004 20:43:01 +0000 Subject: [Rxtx] Garbage/invalid data? In-Reply-To: <20041103202705.GA20010@demeter> References: <20041102164244.GA378@demeter> <20041103182549.GA17519@demeter> <40001.192.168.0.2.1099512237.squirrel@192.168.0.2> <20041103201233.GA19863@demeter> <20041103202705.GA20010@demeter> Message-ID: Hello, Barcodes can have a checksum on them (some don't!!) so which the scanner can check if that checksum doesn't match then the scanner will not return the correct character. Also you can use a better barcode algoritmn than codabar - code 128 has good built in checksumming and will give you less misreads. In addition you can also (as the previous poster mentioned) add a checksum into the barcode itself. Finally if you require secure barcode susceptible to damage - look at 2D barcodes although this is a major change and the barcode reders aer much more expensive than the normal 1D barcodes (yes there is a 3D barcode!!). To avoid noise scewing your transmission up - you need to check if that is the problem - so if you suspect taht your RxTx is giving you problems then try reading with a simple terminal program or a simple test script insomething like python. This is what I mean by a different set-up - I've had serious problem with adjacent equipment that is not correctly shielded and I got monkeys typing shakesphere down the cable!! So thry moving your test rig to another room - although this is obviously not a suitable long term solution!! Also you can look at sheilding your cable or use RJ45/D plug converters - this will let you use CAT5 cable which have a smaller chance of misreading. This lack of ensuring the 'message got there# unlke ethernet communciation is what makes serial so communication so much fun!! Cheers, Neil On Wed, 3 Nov 2004 14:27:05 -0600, Sean Gilbertson wrote: > > Yeah I was really bummed out when I found out that the error code format is so poor. A few options I've thought of are: > > * Reprint all employee cards using a reliable format. > * Replace all damaged cards when errors occur, and accept the risk. > * Couple card scans with the entry of a pre-existing identifier. > > The second response is probably the most practical. However, our business fundamentally requires the addition of employees to increase income, and since we're adding employees quickly, at some point we should probably at least consider switching formats altogether. > > Does codabar allow for ECC? I don't know that it does, and even if it did, to reliably calculate checksums you need to generate numbers that fit the given algorithm. I don't believe we could do that for a system that assigns numbers sequentially. > > > > On Wed, Nov 03, 2004 at 08:14:31PM +0000, jasmine at linuxgrrls.org wrote: > > > > > > On Wed, 3 Nov 2004, Sean Gilbertson wrote: > > > > > Well obviously there is no RS232 stack (that I know of). As I was > > > stating in my own response to this thread, the bar code format we > > > use for our cards is, as I discovered the other day, insecure in > > > that it only specifies two bookend values to evaluate compliance. > > > As a result, any of the content may be invalid; unlike some of the > > > more popular bar code formats, this format (codabar-c) does not > > > feature reliable error detection. > > > > Then for reliability you need to change your software to calculate an ECC > > and add it to every printed barcode. If your system has time to scan > > again on invalid data, a simple error checking hash could be enough; > > otherwise, for example in an automated assembly line, you may need to use > > a full Reed-Solomon type error recovery algorithm. > > > > There is no reliable way to avoid doing this. Sorry :-( > > > > -J. > > -- > Sean Gilbertson > IT Systems/Software Developer > Financial Recovery Services, Inc. > 952-831-4800 x1211 > > This document may contain sensitive information which is intended for the recipient only. Any unauthorized use of the material included in this message could result in criminal investigation. If you have received this message in error please notify the sender. > _______________________________________________ > Rxtx mailing list > Rxtx at linuxgrrls.org > http://mailman.linuxgrrls.org/mailman/listinfo/rxtx > From kmccoig at ist.ucf.edu Sat Nov 6 20:33:45 2004 From: kmccoig at ist.ucf.edu (McCoig, Kenneth) Date: Sat, 6 Nov 2004 22:33:45 -0500 Subject: [Rxtx] native VM errors in Debian? Message-ID: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Hello list! My setup: Debian, latest Sun Java SDK Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install Followed the HOWTO for setting up RXTX. I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x40009315 Function=_dl_relocate_object+0x65 Library=/lib/ld-linux.so.2 Current Java thread: at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586) - locked <0x44770270> (a java.util.Vector) - locked <0x447888d8> (a java.util.Vector) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503) at java.lang.Runtime.loadLibrary0(Runtime.java:788) - locked <0x44783368> (a java.lang.Runtime) at java.lang.System.loadLibrary(System.java:834) at gnu.io.RXTXCommDriver.(RXTXCommDriver.java:72) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at javax.comm.CommPortIdentifier.loadDriver(CommPortIdentifier.java:165) at javax.comm.CommPortIdentifier.(CommPortIdentifier.java:260) at read.main(read.java:20) Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 08056000-08059000 rw-p 0000d000 03:06 7676511 /usr/local/lib/j2sdk1.4.2_06/bin/java 40000000-40016000 r-xp 00000000 03:02 2121049 /lib/ld-2.3.2.so 40016000-40017000 rw-p 00015000 03:02 2121049 /lib/ld-2.3.2.so 40018000-40020000 r-xp 00000000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40020000-40021000 rw-p 00007000 03:06 4315178 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/native_threads/libhpi.so 40021000-4002e000 r-xp 00000000 03:02 2142240 /lib/libpthread-0.10.so 4002e000-40030000 rw-p 0000c000 03:02 2142240 /lib/libpthread-0.10.so 40072000-40074000 r-xp 00000000 03:02 2121910 /lib/libdl-2.3.2.so 40074000-40075000 rw-p 00002000 03:02 2121910 /lib/libdl-2.3.2.so 40076000-4019e000 r-xp 00000000 03:02 2121903 /lib/libc-2.3.2.so 4019e000-401a6000 rw-p 00127000 03:02 2121903 /lib/libc-2.3.2.so 401a9000-405a5000 r-xp 00000000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405a5000-405c1000 rw-p 003fb000 03:06 6466681 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/client/libjvm.so 405d3000-405e5000 r-xp 00000000 03:02 2121913 /lib/libnsl-2.3.2.so 405e5000-405e6000 rw-p 00011000 03:02 2121913 /lib/libnsl-2.3.2.so 405e8000-40609000 r-xp 00000000 03:02 2121911 /lib/libm-2.3.2.so 40609000-4060a000 rw-p 00020000 03:02 2121911 /lib/libm-2.3.2.so 4060a000-4060e000 rw-s 00000000 03:02 2644094 /tmp/hsperfdata_root/935 4060e000-40611000 r--s 00000000 03:06 7673084 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/dnsns.jar 40613000-4061a000 r-xp 00000000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061a000-4061b000 rw-p 00006000 03:02 2121914 /lib/libnss_compat-2.3.2.so 4061b000-40623000 r-xp 00000000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40623000-40624000 rw-p 00007000 03:02 2121918 /lib/libnss_nis-2.3.2.so 40624000-4062c000 r-xp 00000000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062c000-4062d000 rw-p 00008000 03:02 2121916 /lib/libnss_files-2.3.2.so 4062d000-4063d000 r-xp 00000000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063d000-4063f000 rw-p 0000f000 03:06 3291951 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libverify.so 4063f000-4065f000 r-xp 00000000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 4065f000-40661000 rw-p 0001f000 03:06 3291952 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libjava.so 40661000-40675000 r-xp 00000000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40675000-40678000 rw-p 00013000 03:06 3291954 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/libzip.so 40678000-4201f000 r--s 00000000 03:06 1396646 /usr/local/lib/j2sdk1.4.2_06/jre/lib/rt.jar 42069000-4207f000 r--s 00000000 03:06 1395797 /usr/local/lib/j2sdk1.4.2_06/jre/lib/sunrsasign.jar 4207f000-4215c000 r--s 00000000 03:06 1396647 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jsse.jar 4215c000-4216d000 r--s 00000000 03:06 1395798 /usr/local/lib/j2sdk1.4.2_06/jre/lib/jce.jar 4216d000-426c6000 r--s 00000000 03:06 1396648 /usr/local/lib/j2sdk1.4.2_06/jre/lib/charsets.jar 4c7f0000-4c80c000 r--s 00000000 03:06 7673083 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/sunjce_provider.jar 4c80c000-4c819000 r--s 00000000 03:06 7673085 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/ldapsec.jar 4c819000-4c8d5000 r--s 00000000 03:06 7673086 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/localedata.jar 4c8d5000-4c8dc000 r--s 00000000 03:06 7429060 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/RXTXcomm.jar 4c8dc000-4c8e4000 r--s 00000000 03:06 7429061 /usr/local/lib/j2sdk1.4.2_06/jre/lib/ext/comm.jar 4c8e4000-4c8ee000 r-xp 00000000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so 4c8ee000-4c8ef000 rw-p 00009000 03:06 3462063 /usr/local/lib/j2sdk1.4.2_06/jre/lib/i386/librxtxSerial.so Heap at VM Abort: Heap def new generation total 576K, used 338K [0x44770000, 0x44810000, 0x44c50000) eden space 512K, 66% used [0x44770000, 0x447c48a0, 0x447f0000) from space 64K, 0% used [0x447f0000, 0x447f0000, 0x44800000) to space 64K, 0% used [0x44800000, 0x44800000, 0x44810000) tenured generation total 1408K, used 0K [0x44c50000, 0x44db0000, 0x48770000) the space 1408K, 0% used [0x44c50000, 0x44c50000, 0x44c50200, 0x44db0000) compacting perm gen total 4096K, used 1170K [0x48770000, 0x48b70000, 0x4c770000) the space 4096K, 28% used [0x48770000, 0x48894810, 0x48894a00, 0x48b70000) Local Time = Sat Nov 6 21:32:12 2004 Elapsed Time = 0 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode) # Any ideas?? Thanks. -Kenny -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.qbang.org/pipermail/rxtx/attachments/20041106/88e9502e/attachment-0023.html From taj at www.linux.org.uk Sat Nov 6 22:40:43 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 05:40:43 +0000 (GMT) Subject: [Rxtx] native VM errors in Debian? In-Reply-To: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> References: <2BB2EBAEE8BAB84BBBE618F34E98228A03A061D5@exchange.net.ist.ucf.edu> Message-ID: On Sat, 6 Nov 2004, McCoig, Kenneth wrote: > Hello list! > My setup: Debian, latest Sun Java SDK > Downloaded and installed rxtx-2.0-7pre1 (note I did not apt-get install > Followed the HOWTO for setting up RXTX. > I am attempting to use the sample programs that come with the Java Comm API and I get this crazy error: > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x40009315 > Function=_dl_relocate_object+0x65 > Library=/lib/ld-linux.so.2 > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) Did you compile rxtx? This looks very suspicous. Maybe an ABI problem. The library is blowing up while loading. The INSTALL instructions in the tar ball should work on debian when compiling from source. The apt archives also got updated recently and should work. -- Trent Jarvi taj at www.linux.org.uk From taj at www.linux.org.uk Sun Nov 7 08:50:24 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Sun, 7 Nov 2004 15:50:24 +0000 (GMT) Subject: [Rxtx] reading data from serial port on redhat In-Reply-To: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> References: <20041103230934.43204.qmail@web202.biz.mail.re2.yahoo.com> Message-ID: On Wed, 3 Nov 2004, Raine Wang wrote: > Hi, > > I wrote a program to read external device's data > thought serial port. This program need to run at > windows and linux. It runs at windows very well. But > when it runs at linux, it meets a weird problem with > the same external device. It can't get data from the > serial port.It checked the available() and uses > enableReceiveTimeout(). I found there is no data > available. But if I turn on the external device after > the redhat booted up, the program can run and get > data. This program doesn't meet this problem at > windows. This external device doesn't need the driver, > it talks with the pc throught serial port. Now I am > wondering if it is the OS problem or the program > problem. This is far from my limited knowledge. > Welcome any idea. Thanks in advance. After talking to rmk (Linux serial drivers) I have perhaps a hint at what is going on here. At least it may give you an idea where to look. When you open the port, it is going to raise RTS and DSR. Then the port is setup but the device may be trying to talk already. In your application, this may be unreliable/unpredictable. What may need to be done, when the port is opened, RTS/DSR are dropped to prevent anymore data from being sent. Read and discard any data. Then setup the port and then raise the RTS/DTR. rxtx 2.1 has some undocumented extensions to CommAPI available which I think got requested for simular reasons. 'preopened' port manipulation. This gives one control of the RTS/DSR before the Java open() is called. Without knowing more about what is going on, thats about all that could be said at this point. -- Trent Jarvi taj at www.linux.org.uk From jpkorva at iki.fi Tue Nov 9 05:16:43 2004 From: jpkorva at iki.fi (Jari Korva) Date: Tue, 9 Nov 2004 14:16:43 +0200 (EET) Subject: [Rxtx] Kaffe & rxtx & armv5b Message-ID: Hi, what is the current status of Kaffe and RXTX? I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big endian XScale. It was able to find all my serial ports (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to access the ports, the system crashes: Leaving registerValidPorts() CommPortIdentifier:getPortIdentifier(/dev/ttyM1) CommPortIdentifier:open(SerialDemo, 30000) RXTXCommDriver:getCommPort(/dev/ttyM1,1) RXTXPort {} RXTXPort:RXTXPort(/dev/ttyM1) called RXTXPort(open) Segmentation fault It seems to die while returning from configure_port() to JNICALL RXTXPort(open). Cheers, Jari From taj at www.linux.org.uk Tue Nov 9 10:21:19 2004 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 9 Nov 2004 17:21:19 +0000 (GMT) Subject: [Rxtx] Kaffe & rxtx & armv5b In-Reply-To: References: Message-ID: On Tue, 9 Nov 2004, Jari Korva wrote: > Hi, > > what is the current status of Kaffe and RXTX? > > I've tried Kaffe (cvs head) together with rxtx (2.1-7pre17) on my big > endian XScale. It was able to find all my serial ports > (CommPortIdentifier.getPortIdentifiers()) but when I actually tried to > access the ports, the system crashes: > > Leaving registerValidPorts() > CommPortIdentifier:getPortIdentifier(/dev/ttyM1) > CommPortIdentifier:open(SerialDemo, 30000) > RXTXCommDriver:getCommPort(/dev/ttyM1,1) > RXTXPort {} > RXTXPort:RXTXPort(/dev/ttyM1) called > RXTXPort(open) > Segmentation fault > > It seems to die while returning from configure_port() to > JNICALL RXTXPort(open). > Hi Jari There was an issue solved in 2.1 CVS that may be causing the observed problem. RXTX was including the kernel termios rather than the glibc termios. The later is larger and would overrun the former while configuring the port. I had not seen this cause problems but others did. You can do a simple test with pre17 by cutting the following out of SerialImp.c: #ifdef HAVE_ASM_TERMBITS_H # include #else There is also a fix for threading issues which should help *bsd and Kaffe. This would obviously be after the port is configured. But we have no testing results for Kaffe at this point. -- Trent Jarvi taj at www.linux.org.uk From matt at thebasement.com Tue Nov 9 23:47:34 2004 From: matt at thebasement.com (Matt Galloway) Date: Wed, 10 Nov 2004 00:47:34 -0600 Subject: [Rxtx] Mac OS X Questions Message-ID: <1100069254.4191b9860c962@mail.gallowayfore.com>